package com.xxxx.seckill.VO;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

/**
 * 公共返回对象枚举
 */
@Getter
@ToString
@AllArgsConstructor
public enum ResponseBeanEnum {
    /**
     * 通用
     */
    SUCCESS(200, "success"),
    ERROR(500, "ERROR"),
    /**
     * 登录模块5002xx
     */
    LOGIN_ERROR(500210, "用户名或密码不正确"),
    MOBILE_ERROR(500211, "手机号码格式不正确"),
    BIND_ERROR(500212, "参数校验异常"),
    MOBILE_NOT_EXISTS(500213, "手机号码不存在"),
    UPDATE_PASSWORD_FAILURE(500214, "更新密码失败"),
    USER_NOT_EXISTS(500215, "用户不存在"),
    /**
     * 秒杀模块5005xx
     */
    EMPTY_STOCK(500500, "库存不足"),
    DUPLICATE_ORDER(500501, "该商品每人限购一件"),
    REQUEST_ILLEGAL(500502, "请求非法，请重新尝试"),
    CAPTCHA_ERROR(500503, "验证码错误，请重新输入"),
    ACCESS_TOO_FREQUENTLY(500504, "访问过于频繁，请稍后再试"),
    /**
     * 订单模块5003xx
     */
    ORDER_NOT_EXISTS(500300, "订单信息不存在")
    ;


    private final Integer code;
    private final String message;
}
